/**
 * 
 */
package com.dashboard.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.dashboard.dao.DreDao;
import com.dashboard.domain.Organizacao;

/**
 * @author Joao
 * 
 */
@Service
public class ServicoDreImpl implements ServicoDre 
{
	private DreDao dreDao;

	/**
	 * Construtor com os daos necess&aacute;rios para inje&ccedil;&atilde;o.
	 * 
	 * @param organizacaoDao o dao de organiza&ccedil;&atilde;o.
	 */
	@Autowired
	public ServicoDreImpl(DreDao dreDao)
	{
		this.dreDao = dreDao;
	}

	/**
	 * {@inheritDoc}
	 */
	@Transactional
	public void criar(Organizacao organizacao, String nome, String descricao) 
	{
		dreDao.persistir(organizacao, nome, descricao);
	}
}